package com.wing.wecom.controller;

import chat.qiye.wechat.sdk.api.message.resp.AppMessageSendResp;
import com.wing.wecom.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Hui.Wang [huzi.wh@gmail.com]
 * @version : 1.0
 * @date : 2021/9/14
 */
@RestController
public class MessageController {

    @Autowired
    private MessageService messageService;

    @GetMapping("/message/send")
    public AppMessageSendResp sentMessage(String mobile, Integer agentid) {
//        AppMessageDto appMessageDto = new AppMessageDto();
//        appMessageDto.setTouser();
//        return appMessageApi.sentMessage(appMessageDto);
        return messageService.sentMessage(mobile, agentid);
    }

}
